#   SCE CONFIDENTIAL
#   PLAYSTATION(R)3 Programmer Tool Runtime Library 192.001
#   Copyright (C) 2007 Sony Computer Entertainment Inc.
#   All Rights Reserved.
#

.PHONY : do-subdirs do-mk-target

do-subdirs:
ifneq ($(SUBDIRS),)
	@for dir in $(SUBDIRS); do \
		echo $(MAKE) -C $$dir; \
		$(MAKE) -C $$dir; \
	done
endif

do-mk-target: do-subdirs
ifneq ($(MK_TARGET),)
	@for mk in $(MK_TARGET); do \
		echo $(MAKE) --no-print-directory -f $$mk; \
		$(MAKE) --no-print-directory -f $$mk; \
	done
endif

.PHONY : $(SUBDIRS_CLEAN) $(MK_TARGET_CLEAN)

$(SUBDIRS_CLEAN):
	$(MAKE) -C $(@:%-subdir-clean=%) clean

$(MK_TARGET_CLEAN):
	$(MAKE) --no-print-directory  -f $(@:%-mk-clean=%) clean

TARGET              +=  do-subdirs do-mk-target

